<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>第一个JSP程序</title>
    <script type="text/javascript" src="../jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(function() {
            //when可以指定在多个ajax程序执行完毕之后才进行操作
            var promise = $.when($.ajax("02.html",{
                dataType:"html"
            }),$.ajax("03.html",{
                dataType:"html"
            }));
            promise.done(function(data1,data2){
                alert(data1);
                alert(data2);
            }).fail(function(){

            });

        })
    </script>
</head>

<body>


</body>

</html>
